<template>
  
  <div class="app-container home">
    <el-row>
      <el-col :sm="24" :lg="12" style="padding-left: 50px">
        <el-row>
          <el-col :span="12">
            <h2></h2>
          </el-col>
        </el-row>
        <el-row>
    
        </el-row>
      </el-col>
    </el-row>
    <el-divider />
   <div>
    <el-row>
      <el-button type="danger" @click="dialogFormVisible = true">开启成长报告</el-button>

<el-dialog title="截止的时间" :visible.sync="dialogFormVisible"  width="30%"  center>
  <el-form :model="form">
    <el-form-item label="截止时间">
    <el-col :span="11">
      <el-date-picker type="date" placeholder="选择日期" v-model="form.date1" style="width: 150%;"></el-date-picker>
    
    </el-col>
  </el-form-item>
  </el-form>
  <div slot="footer" class="dialog-footer">
    <el-button @click="no" class="btn">取 消</el-button>
    <el-button type="primary" @click="ok" class="btn1">确 定</el-button>
  </div>
</el-dialog>
</el-row>
   </div>
  </div>
</template>

<script>
import {getnowgrowth} from "@/api/index";

// import dialogComponent from "./dig";
export default {
  name: "Index",
  // components:{
  //         dialogComponent
  //     },
  data () {
    return {
      // 版本号
      version: "3.8.4",
      dialogFormVisible: false,
      endTime:'',
      form: {
          name: '',
          region: '',
          date1: '',
          date2: '',
          delivery: false,
          type: [],
          resource: '', 
          desc: ''
        },
       
    };
  },
  methods: {
    goTarget (href) {
      window.open(href, "_blank");
    },
     // 7.实现点击事件，点击事件一定要包含以下内容
    //  handleClick(data){
    //       this.Visiable=true;
          // this.$nextTick(()=>{
          // // 这里的dialog与上面dialog-component组件里面的ref属性值是一致的
          // // init调用的是dialog-component组件里面的init方法
          // // data是传递给弹窗页面的值
          //   this.$refs.dialog.init(data);
          // })
        no(){
          this.dialogFormVisible = false;
          console.log()
        },
       async ok(){
          this.dialogFormVisible = false;

          console.log(this.form.date1)
          
          const res=await getnowgrowth ({endTime:this.form.date1}) //传参这里也需要对应
        }
        },
      }
  //  }

  
</script>

<style scoped lang="scss">
.home {
  blockquote {
    padding: 10px 20px;
    margin: 0 0 20px;
    font-size: 17.5px;
    border-left: 5px solid #eee;
  }
  hr {
    margin-top: 20px;
    margin-bottom: 20px;
    border: 0;
    border-top: 1px solid #eee;
  }
  .col-item {
    margin-bottom: 20px;
  }

  ul {
    padding: 0;
    margin: 0;
  }

  font-family: "open sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 13px;
  color: #676a6c;
  overflow-x: hidden;

  ul {
    list-style-type: none;
  }

  h4 {
    margin-top: 0px;
  }

  h2 {
    margin-top: 10px;
    font-size: 26px;
    font-weight: 100;
  }

  p {
    margin-top: 10px;

    b {
      font-weight: 700;
    }
  }

  .update-log {
    ol {
      display: block;
      list-style-type: decimal;
      margin-block-start: 1em;
      margin-block-end: 1em;
      margin-inline-start: 0;
      margin-inline-end: 0;
      padding-inline-start: 40px;
    }
  }
// .dialog-footer{
// display: flex;
// justify-content: space-between;
// width: 200px;
// margin: 0 auto;

// }

// .btn {
//   width: 80px;
//   height: 30px;
//   border-radius: 5px;
//   background-color:#7c0000;
//   color: #fff;
//   font-size: 16px;
//   border: none;
// }

// .btn1 {
//   width: 80px;
//   height: 30px;
//   border-radius: 5px;
//   background-color:#fff;
//   color: #7c0000;
//   font-size: 16px;
//   border: 2px solid #bbbbbb;
// }  
}
</style>

